#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
using namespace std;
class Solution {
public:
    string defangIPaddr(string address)
    {
        string ret;
        for (auto& c : address)
        {
            if (c == '.')
            {
                ret.append("[.]");
            }
            else
                ret.push_back(c);
        }
        return ret;
    }
};